package day240519_report.e4;

public class Rectangle extends Shape {
    //state
    private double length;
    private double width;
    //constructor

    //behavior

    public double getLength() {
        return length;
    }

    public double getWidth() {
        return width;
    }

    public Rectangle setLength(double length) {
        this.length = length;
        return this;
    }

    public Rectangle setWidth(double width) {
        this.width = width;
        return this;
    }

    public double getPerimeter() {
        return 2 * (getLength() + getWidth());
    }

    public double getArea() {
        return getLength() * getWidth();
    }
}
